package cn.itsource.zcn.alipay.service.impl;

import cn.itsource.zcn.alipay.domain.PayAlipayInfo;
import cn.itsource.zcn.alipay.service.AliPayService;
import cn.itsource.zcn.alipay.util.AlipayUtil;
import cn.itsource.zcn.pay.domain.PayBill;
import org.springframework.stereotype.Service;

@Service
public class AliPayServiceImpl implements AliPayService {
    //支付
    @Override
    public String pay(PayBill payBill, PayAlipayInfo payAlipayInfo) {
        String businessType = payBill.getBusinessType();
        if(businessType.equals("AliPay")){
            return AlipayUtil.aliPay(payBill,payAlipayInfo);
        }
        return null;
    }
}
